<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="../../js/jquery-3.7.1.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function(){
				//ready函数文档数加载完毕开始执行
				$("#add").click(function(){
					let div=$("<div></div>")
					let file=$("<input type='file'  />")
					let btn=$("<button type='button' class='del' onclick='fun()'>删除</button>")
					div.append(file)
					div.append(btn)
					$("#con").append(div)
				})
			})
			function fun(){
				$(event.target.parentNode).remove()
			}
		</script>
	</head>
	选择你要上传的文件:
	<div id="">
		<input type="file" name="" id="" value="" />
		<button type="button" id="add">增加</button>
	</div>
	<div id="con">
		<!-- 在此处增加新内容 -->
	</div>
	<body>
	</body>
</html>
